package com.ruoyi.game.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.game.mapper.GameExpandMapper;
import com.ruoyi.game.domain.GameExpand;
import com.ruoyi.game.service.IGameExpandService;

/**
 * 推广记录Service业务层处理
 * 
 * @author qidian
 * @date 2022-05-06
 */
@Service
public class GameExpandServiceImpl implements IGameExpandService 
{
    @Autowired
    private GameExpandMapper gameExpandMapper;

    /**
     * 查询推广记录
     * 
     * @param id 推广记录主键
     * @return 推广记录
     */
    @Override
    public GameExpand selectGameExpandById(Long id)
    {
        return gameExpandMapper.selectGameExpandById(id);
    }

    /**
     * 查询推广记录列表
     * 
     * @param gameExpand 推广记录
     * @return 推广记录
     */
    @Override
    public List<GameExpand> selectGameExpandList(GameExpand gameExpand)
    {
        return gameExpandMapper.selectGameExpandList(gameExpand);
    }

    /**
     * 新增推广记录
     * 
     * @param gameExpand 推广记录
     * @return 结果
     */
    @Override
    public int insertGameExpand(GameExpand gameExpand)
    {
        gameExpand.setCreateTime(DateUtils.getNowDate());
        return gameExpandMapper.insertGameExpand(gameExpand);
    }

    /**
     * 修改推广记录
     * 
     * @param gameExpand 推广记录
     * @return 结果
     */
    @Override
    public int updateGameExpand(GameExpand gameExpand)
    {
        gameExpand.setUpdateTime(DateUtils.getNowDate());
        return gameExpandMapper.updateGameExpand(gameExpand);
    }

    /**
     * 批量删除推广记录
     * 
     * @param ids 需要删除的推广记录主键
     * @return 结果
     */
    @Override
    public int deleteGameExpandByIds(Long[] ids)
    {
        return gameExpandMapper.deleteGameExpandByIds(ids);
    }

    /**
     * 删除推广记录信息
     * 
     * @param id 推广记录主键
     * @return 结果
     */
    @Override
    public int deleteGameExpandById(Long id)
    {
        return gameExpandMapper.deleteGameExpandById(id);
    }
}
